/*   1:    */ package org.jetbrains.lang.manifest.parser;
/*   2:    */ 
/*   3:    */

import com.intellij.lang.ASTNode;
import com.intellij.lang.ParserDefinition;
import com.intellij.lang.ParserDefinition.SpaceRequirements;
import com.intellij.lang.PsiParser;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.project.Project;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.util.PsiUtilCore;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.lang.manifest.psi.Header;
import org.jetbrains.lang.manifest.psi.ManifestElementType;
import org.jetbrains.lang.manifest.psi.impl.ManifestFileImpl;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */
/*  15:    */
/*  16:    */
/*  17:    */
/*  18:    */
/*  19:    */
/*  20:    */ 
/*  21:    */ public class ManifestParserDefinition
/*  22:    */   implements ParserDefinition
/*  23:    */ {
/*  24:    */   @NotNull
/*  25:    */   public Lexer createLexer(Project paramProject)
/*  26:    */   {
/*  27: 51 */     void tmp7_4 = new ManifestLexer();
/*  28: 51 */     if (tmp7_4 == null) {
/*  29: 51 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "createLexer" }));
/*  30:    */     }
/*  31: 51 */     return tmp7_4;
/*  32:    */   }
/*  33:    */   
/*  34:    */   public PsiParser createParser(Project paramProject)
/*  35:    */   {
/*  36: 56 */     return new ManifestParser();
/*  37:    */   }
/*  38:    */   
/*  39:    */   public IFileElementType getFileNodeType()
/*  40:    */   {
/*  41: 61 */     return ManifestElementType.FILE;
/*  42:    */   }
/*  43:    */   
/*  44:    */   @NotNull
/*  45:    */   public TokenSet getWhitespaceTokens()
/*  46:    */   {
/*  47: 67 */     TokenSet tmp3_0 = TokenSet.EMPTY;
/*  48: 67 */     if (tmp3_0 == null) {
/*  49: 67 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "getWhitespaceTokens" }));
/*  50:    */     }
/*  51: 67 */     return tmp3_0;
/*  52:    */   }
/*  53:    */   
/*  54:    */   @NotNull
/*  55:    */   public TokenSet getCommentTokens()
/*  56:    */   {
/*  57: 73 */     TokenSet tmp3_0 = TokenSet.EMPTY;
/*  58: 73 */     if (tmp3_0 == null) {
/*  59: 73 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "getCommentTokens" }));
/*  60:    */     }
/*  61: 73 */     return tmp3_0;
/*  62:    */   }
/*  63:    */   
/*  64:    */   @NotNull
/*  65:    */   public TokenSet getStringLiteralElements()
/*  66:    */   {
/*  67: 79 */     TokenSet tmp3_0 = TokenSet.EMPTY;
/*  68: 79 */     if (tmp3_0 == null) {
/*  69: 79 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "getStringLiteralElements" }));
/*  70:    */     }
/*  71: 79 */     return tmp3_0;
/*  72:    */   }
/*  73:    */   
/*  74:    */   @NotNull
/*  75:    */   public PsiElement createElement(ASTNode paramASTNode)
/*  76:    */   {
/*  77: 85 */     IElementType localIElementType = paramASTNode.getElementType();
/*  78: 86 */     if ((localIElementType instanceof ManifestElementType))
/*  79:    */     {
/*  80: 87 */       PsiElement tmp22_19 = ((ManifestElementType)localIElementType).createPsi(paramASTNode);
/*  81: 87 */       if (tmp22_19 == null) {
/*  82: 87 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "createElement" }));
/*  83:    */       }
/*  84: 87 */       return tmp22_19;
/*  85:    */     }
/*  86: 90 */     PsiElement tmp60_57 = PsiUtilCore.NULL_PSI_ELEMENT;
/*  87: 90 */     if (tmp60_57 == null) {
/*  88: 90 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/parser/ManifestParserDefinition", "createElement" }));
/*  89:    */     }
/*  90: 90 */     return tmp60_57;
/*  91:    */   }
/*  92:    */   
/*  93:    */   public PsiFile createFile(FileViewProvider paramFileViewProvider)
/*  94:    */   {
/*  95: 95 */     return new ManifestFileImpl(paramFileViewProvider);
/*  96:    */   }
/*  97:    */   
/*  98:    */   public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode paramASTNode1, ASTNode paramASTNode2)
/*  99:    */   {
/* 100:101 */     return ((paramASTNode1.getPsi() instanceof Header)) || ((paramASTNode2.getPsi() instanceof Header)) ? ParserDefinition.SpaceRequirements.MUST_LINE_BREAK : ParserDefinition.SpaceRequirements.MUST_NOT;
/* 101:    */   }
/* 102:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.lang.manifest.parser.ManifestParserDefinition

 * JD-Core Version:    0.7.0.1

 */